﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Ex03.GarageLogic
{
    public class InternalCombustionBike : Bike
    {
        private const float k_InternalCombustionBikeMaximumFuelCapacityInLitres = 6F;
        private const EnergyType.eEnergyType k_InternalCombustionBikeFuelType = EnergyType.eEnergyType.Octan98;
        private const int k_InternalCombustionBikeWheelAmount = 2;
        private const float k_InternalCombustionBikeWheelMaximumAirPressure = 31F;
        
        private InternalCombustionPropulsion m_InternalCombustionBikePropulsionType;

        public InternalCombustionBike(
            string i_InternalCombustionBikeModelName,
            string i_InternalCombustionBikeLicenseNumber, 
            eBikePermitType i_InternalCombustionBikePermitType,
            int i_InternalCombustionBikeEngineVolume)
            : base(
            i_InternalCombustionBikeModelName,
            i_InternalCombustionBikeLicenseNumber, 
            k_InternalCombustionBikeWheelAmount,
            k_InternalCombustionBikeWheelMaximumAirPressure,
            i_InternalCombustionBikePermitType, 
            i_InternalCombustionBikeEngineVolume)
        {
            m_InternalCombustionBikePropulsionType = new InternalCombustionPropulsion(k_InternalCombustionBikeFuelType, k_InternalCombustionBikeMaximumFuelCapacityInLitres);
        }

        public override bool AddPropulsionMaterial(
            EnergyType.eEnergyType i_PropulsionMaterialType,
            float i_PropulsionMaterialAmountToAdd)
        {
            return m_InternalCombustionBikePropulsionType.AddPropulsionMaterial(i_PropulsionMaterialType, 
                i_PropulsionMaterialAmountToAdd);
        }
    }
}
